Do not prematurely truncate python eldoc string
authorJames Thomas <jimjoe@gmx.net>
Sat, 22 Jun 2024 12:27:00 +0000 (17:57 +0530)
committerEli Zaretskii <eliz@gnu.org>
Thu, 27 Jun 2024 08:53:29 +0000 (11:53 +0300)
'eldoc-echo-area-use-multiline-p' is there for that.
* lisp/progmodes/python.el (python-eldoc-setup-code):
Make the change.  (Bug#71720)

* etc/NEWS: Announce the change in behavior.

etc/NEWS
lisp/progmodes/python.el

index 8d360063f7ac11f34881c5b7bdfa530d3fc6ad74..b1b01b80bbbce6fbbf49be624d58de79e609e05d 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1555,6 +1555,11 @@ interactive Python interpreter specified by 'python-interpreter'.
 It sends the python block delimited by 'python-nav-beginning-of-block'
 and 'python-nav-end-of-block' to the inferior Python process.
 
+*** 'eldoc' no longer truncates to a single line by default.
+Previously, the entire docstring was not available to eldoc, which made
+'eldoc-echo-area-use-multiline-p' ineffective.  The old behaviour may be
+kept by setting that.
+
 ** Inferior Python mode
 
 ---
index ca5ecfab6ead620f95aefb24b9dc8157b05c032c..89eefd1f08a0cc486b5f7a38bf89807768f55e35 100644 (file)
@@ -5612,8 +5612,6 @@ See `python-check-command' for the default."
                 doc = '{objtype} {name}{args}'.format(
                     objtype=objtype, name=name, args=args
                 )
-        else:
-            doc = doc.splitlines()[0]
     except:
         doc = ''
     return doc"